﻿<phone:PhoneApplicationPage x:Class="WhallaToolkit.FeedbackControl.FeedbackPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            mc:Ignorable="d">
    <phone:PhoneApplicationPage.Resources>
        <ControlTemplate x:Key="PhoneDisabledTextBoxTemplate"
                         TargetType="TextBox">
            <ContentControl x:Name="ContentElement"
                            BorderThickness="0"
                            HorizontalContentAlignment="Stretch"
                            Margin="{StaticResource PhoneTextBoxInnerMargin}"
                            Padding="{TemplateBinding Padding}"
                            VerticalContentAlignment="Stretch" />
        </ControlTemplate>
        <Style x:Key="InputTextBoxStyle"
               TargetType="TextBox">
            <Setter Property="FontFamily"
                    Value="{StaticResource PhoneFontFamilyNormal}" />
            <Setter Property="FontSize"
                    Value="{StaticResource PhoneFontSizeMediumLarge}" />
            <Setter Property="Background"
                    Value="{StaticResource PhoneTextBoxBrush}" />
            <Setter Property="Foreground"
                    Value="{StaticResource PhoneTextBoxForegroundBrush}" />
            <Setter Property="BorderBrush"
                    Value="{StaticResource PhoneTextBoxBrush}" />
            <Setter Property="SelectionBackground"
                    Value="{StaticResource PhoneAccentBrush}" />
            <Setter Property="SelectionForeground"
                    Value="{StaticResource PhoneTextBoxSelectionForegroundBrush}" />
            <Setter Property="BorderThickness"
                    Value="{StaticResource PhoneBorderThickness}" />
            <Setter Property="Padding"
                    Value="2" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Grid Background="Transparent">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="MouseOver" />
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                           Storyboard.TargetName="EnabledBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                           Storyboard.TargetName="DisabledOrReadonlyBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="ReadOnly">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                           Storyboard.TargetName="EnabledBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                           Storyboard.TargetName="DisabledOrReadonlyBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
                                                                           Storyboard.TargetName="DisabledOrReadonlyBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="{StaticResource PhoneTextBoxBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush"
                                                                           Storyboard.TargetName="DisabledOrReadonlyBorder">
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="{StaticResource PhoneTextBoxBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                                                           Storyboard.TargetName="DisabledOrReadonlyContent">
                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                        Value="{StaticResource PhoneTextBoxReadOnlyBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0:0:0.5" />
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Background)"
                                                                           Storyboard.TargetName="ContentElement">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <SolidColorBrush Color="White" />
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused" />
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="EnabledBorder"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{TemplateBinding Background}"
                                    Margin="{StaticResource PhoneTouchTargetOverhang}">
                                <ContentControl x:Name="ContentElement"
                                                BorderThickness="0"
                                                HorizontalContentAlignment="Stretch"
                                                Margin="{StaticResource PhoneTextBoxInnerMargin}"
                                                Padding="{TemplateBinding Padding}"
                                                VerticalContentAlignment="Stretch" />
                            </Border>
                            <Border x:Name="DisabledOrReadonlyBorder"
                                    BorderBrush="{StaticResource PhoneDisabledBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="Transparent"
                                    Margin="{StaticResource PhoneTouchTargetOverhang}"
                                    Visibility="Collapsed">
                                <TextBox x:Name="DisabledOrReadonlyContent"
                                         Background="Transparent"
                                         Foreground="{StaticResource PhoneDisabledBrush}"
                                         FontWeight="{TemplateBinding FontWeight}"
                                         FontStyle="{TemplateBinding FontStyle}"
                                         FontSize="{TemplateBinding FontSize}"
                                         FontFamily="{TemplateBinding FontFamily}"
                                         IsReadOnly="True"
                                         SelectionForeground="{TemplateBinding SelectionForeground}"
                                         SelectionBackground="{TemplateBinding SelectionBackground}"
                                         TextAlignment="{TemplateBinding TextAlignment}"
                                         TextWrapping="{TemplateBinding TextWrapping}"
                                         Text="{TemplateBinding Text}"
                                         Template="{StaticResource PhoneDisabledTextBoxTemplate}" />
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot"
          Background="#FFF3F3F3">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"
                           MinHeight="61" />
            <RowDefinition Height="Auto" />
            <RowDefinition/>
        </Grid.RowDefinitions>
        <TextBlock TextWrapping="Wrap" Text="What do you think about our application ? Let us know what should we fix or improve. Thanks!" Grid.Row="1" Foreground="#FF404041" FontFamily="Segoe WP SemiLight" FontSize="16" Padding="24,0,0,0"/>
        <Viewbox xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,-51,129" Grid.Row="2" Width="400" Height="400" Opacity="0.445">
            <Grid d:IsLocked="True">
                <Grid x:Name="backgroundGrid"
                      Width="256"
                      Height="256"
                      Visibility="Collapsed" d:IsLocked="True" />
                <Path Data="M4.0930037,20.177994C4.0930037,20.177994,5.3670039,21.112993,6.2150037,21.365993L6.2150037,26.368985C6.2150037,26.368985,3.4990039,23.23399,0.95200443,25.187987z M17.552985,19.308009L19.27201,33.640009 13.642004,30.898005 9.4859979,33.329004 8.1040092,21.810023C8.1040091,21.810023,13.595007,23.760005,17.552985,19.308009z M11.571003,7.2219973L8.1810021,7.7689962 8.0580017,8.1659966C8.1890019,8.1569967 8.3090019,8.1539965 8.4170019,8.1539965 8.632002,8.1539965 8.804002,8.2109966 8.9320021,8.3269968 9.0600021,8.4419966 9.125002,8.574996 9.125002,8.725996 9.125002,8.9559965 9.0580021,9.2999964 8.9240022,9.7559958L7.5350017,14.532994C7.4180017,14.913993 7.3600017,15.230993 7.3600015,15.477993 7.3600017,15.849993 7.4900017,16.158993 7.747002,16.402993 8.0050018,16.647993 8.3470019,16.768993 8.7780018,16.768993 9.9100022,16.768993 10.983002,15.890993 11.992003,14.137994L11.645003,13.938994C11.232002,14.583993 10.871002,15.030993 10.566002,15.278993 10.458002,15.377993 10.346002,15.428993 10.230003,15.428993 10.163002,15.428993 10.102002,15.395993 10.042002,15.328994 9.9850023,15.261993 9.9550023,15.195993 9.9550024,15.130993 9.9550023,14.998993 10.010002,14.727993 10.116003,14.322994L12.166003,7.2219973z M11.545003,2.6169987C11.140002,2.6169987 10.796002,2.7609997 10.515002,3.0519981 10.233002,3.3419991 10.094002,3.6889982 10.094002,4.093998 10.094002,4.4999981 10.234002,4.8449984 10.520002,5.1309977 10.806002,5.4159975 11.147002,5.5579977 11.545003,5.5579977 11.950003,5.5579977 12.300003,5.4159975 12.587002,5.1309977 12.878003,4.8449984 13.023003,4.4999981 13.023003,4.093998 13.023003,3.6889982 12.880003,3.3419991 12.594003,3.0519981 12.307003,2.7609997 11.960003,2.6169987 11.545003,2.6169987z M10.191002,0C15.821003,0 20.383004,4.5189981 20.383004,10.089995 20.383004,15.661993 15.821003,20.177991 10.191002,20.177991 4.562001,20.177991 0,15.661993 0,10.089995 0,4.5189981 4.562001,0 10.191002,0z"
                      Stretch="Uniform"
                      Fill="#FFFFFDFD"
                      Width="138"
                      Height="138"
                      Margin="0,0,0,0"
                      RenderTransformOrigin="0.5,0.5" d:IsLocked="True">
                    <Path.RenderTransform>
                        <TransformGroup>
                        	<RotateTransform Angle="0" />
                        	<ScaleTransform ScaleX="1"
                        		ScaleY="1" />
                        </TransformGroup>
                    </Path.RenderTransform>
                </Path>
            </Grid>
        </Viewbox>

        <Image Source="Assets/Untitled-1.png"
               Stretch="Fill"
               Grid.RowSpan="3"
               Margin="1,0,-1,0" Opacity="0.5" Visibility="Collapsed" />

        <!--ContentPanel - place additional content here-->
        <TextBlock
                   TextWrapping="Wrap"
                   Text="feedback"
                   VerticalAlignment="Center"
                   Foreground="#FF404041"
                   FontFamily="Segoe WP Light"
                   FontSize="64" Height="85" Margin="24,51,0,0" />

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel"
              Grid.Row="2" Grid.RowSpan="2">
            <StackPanel Orientation="Vertical"
                        Margin="0,11,0,0">
                <TextBlock TextWrapping="Wrap"
                           Text="Application"
                           Foreground="#FF404041"
                           Padding="26,0,0,0"
                           FontFamily="Segoe WP Light"
                           FontSize="26.667" />
                <TextBlock x:Name="_PART_ApplicationName"
                           TextWrapping="Wrap"
                           Text="Whalla Labs"
                           Foreground="#B3404041"
                           Padding="26,0,0,0"
                           FontFamily="Segoe WP Light"
                           FontSize="21.333"
                           Margin="0,12,0,0" />
                <TextBlock TextWrapping="Wrap"
                           Text="Your Ideas"
                           Foreground="#FF404041"
                           Padding="26,0,0,0"
                           FontFamily="Segoe WP Light"
                           FontSize="26.667"
                           Margin="0,20,0,0" />
                <TextBox x:Name="_PART_FeedbackData"
                         TextWrapping="Wrap"
                         BorderBrush="#FFB2B2B2"
                         InputScope="Text"
                         TextChanged="_PART_FeedbackData_TextChanged"
                         Background="{x:Null}"
                         Padding="4,2,2,2"
                         BorderThickness="1"
                         Foreground="#FF404041"
                         FontFamily="Segoe WP Light"
                         FontSize="21.333"
                         Height="396"
                         Margin="12,-4,12,0"
                         Style="{StaticResource InputTextBoxStyle}" />
            </StackPanel>
        </Grid>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar Mode="Default"
                              Opacity="1.0"
                              IsVisible="True"
                              BackgroundColor="#FF404041">

            <shell:ApplicationBarIconButton IconUri="/FeedbackControl/Assets/send.png"
                                            Text="Send"
                                            Click="SendEmailExecute"
                                            IsEnabled="False"/>

        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>